#pragma once

class DynamicSurface;
class RVertexArray;

#define DYNGEOMETRY_BUFFER_SIZE 8388608*2 // 8 MB

class DynGeometryMgr
{
public:
	DynGeometryMgr();
	virtual ~DynGeometryMgr();

	void				InitDynGeometryMgr();
	DynamicSurface*		BeginGeometry(uint numVertices, uint types);
	RVertexArray*		EndGeometry();

	void				EndGeometryAndDraw(ETopology::Type topology, int begin, int end);

private:
	IMutex*				m_dynGeometry_mutex;
	RBuffer*			m_dynGeometryBuffer;
	uint				m_bufferOffset;
	DynamicSurface*		m_dynamicSurface;
};

